home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LIFE_SIM / VERSION_ / MAINEVTB.C < prev   
Text File  |  1992-03-12  |  619b  |  35 lines

  1. /* Cell Proj 1.0 */
  2.  
  3. #include "MacProto.h"
  4. #include "Cell_Proto.h"
  5. #include "Cell_Definitions.h"
  6. #include "Cell_Variables.h"
  7.  
  8. HandleEvent()
  9. {
  10.     char    theChar;
  11.     
  12.     switch ( gTheEvent.what )
  13.     {
  14.         case nullEvent:
  15.             if ( FrontWindow() == gCellWindow )
  16.             {
  17.                 DoCellularAutomata();
  18.             }
  19.         case mouseDown:
  20.             HandleMouseDown();
  21.             break;
  22.         case keyDown:
  23.         case autoKey:
  24.             theChar = gTheEvent.message & charCodeMask;
  25.             if (( gTheEvent.modifiers & cmdKey ) != 0 )
  26.                 HandleMenuChoice( MenuKey( theChar ));
  27.             break;
  28.         case updateEvt:
  29.             HandleUpdateEvt();
  30.             break;
  31.         case activateEvt:
  32.             HandleActivateEvt();
  33.             break;
  34.     }
  35. }